package cn.liberals.org.mapper;

import cn.liberals.basic.mapper.BaseMapper;
import cn.liberals.org.domain.Employee;
import cn.liberals.org.query.EmployeeQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper

/**
* @Description:
* @Author: liberals
* @Version: 1.0
* @Date:  2022/6/21 21:43  
*/
public interface EmployeeMapper extends BaseMapper<Employee> {
    // 根据名称查询员工
    Employee loadByUserName(String username);
    // 基础的接口方法从父类过来

    List<Employee> queryData(EmployeeQuery employeeQuery);

    // 根据id删除关联表数据
    void removeEmployeeRole(Long id);

    // 添加关联表数据
    void saveEmployeeRole(@Param("id") Long id, @Param("ids") List<Long> roles);

    void removeEmpRole(Long id);

    Employee loadByLoginInfoId(Long logininfoId);

    List<Employee> loadByShopId(Long shopId);
    // 自己的接口方法写在自己的模块接口中

}
